<!--
 * @Description: 
 * @Autor: 赵子惠
 * @Date: 2021-07-06 17:03:21
 * @LastEditors: 赵子惠
 * @LastEditTime: 2021-07-08 08:58:57
-->
<div bsModal #createOrEditModal="bs-modal" (onShown)="onShown()" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" >
            <form #bopForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
                <div class="modal-header">
                    <h4 class="modal-title">
                        <span>{{title}}</span>
                    </h4>
                    <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div class="modal-body">
                    <!-- <div class="form-group flex">
                        <label style="margin-right: 20px; margin-top: 5px;" for="model">名称*</label>
                        <input style="width: 200px;" name="model" #modelInput="ngModel" name="model"  type="text" class="form-control" [(ngModel)]="form.calendarName" required maxlength="256"/>
                        <validation-messages [formCtrl]="modelInput"></validation-messages>
                    </div> -->
                    <div  class="form-group flex">
                        <label style="margin-right: 20px; margin-top: 5px;" for="model">名称*</label>
                        <input style="width: 200px;" name="model" #modelInput="ngModel" name="model"  type="text" class="form-control" [(ngModel)]="form.calendarName" required maxlength="256"/>
                        <validation-messages [formCtrl]="modelInput"></validation-messages>
                    </div>
                    <div class="form-group flex">
                        <label style="margin-top: 5px;margin-right: 20px;" for="isUsed">休息/工作 *</label>
                        <p-toggleButton name="isUsed" [(ngModel)]="form.workArrangement" onLabel="工作" offLabel="休息" onIcon="pi pi-check" offIcon="pi pi-times" [style]="{'width':'150px'}"></p-toggleButton>
                    </div>
                    <div  class="form-group flex">
                        <label style="margin-right: 20px; margin-top: 5px;" for="model">开始时间*</label>
                        <p-calendar [(ngModel)]="form.startDate" showIcon="true" required #modelInputStart="ngModel" dateFormat="yy-mm-dd" id="startTime" name="startTime"></p-calendar>
                        <validation-messages [formCtrl]="modelInputStart"></validation-messages>

                    </div>
                    <div  class="form-group flex">
                        <label style="margin-right: 20px; margin-top: 5px;" for="model">结束时间*</label>
                        <p-calendar [(ngModel)]="form.endDate" showIcon="true" required #modelInputEnd="ngModel" dateFormat="yy-mm-dd" id="endTime" name="endTime"></p-calendar>
                        <validation-messages [formCtrl]="modelInputEnd"></validation-messages>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="submit" [disabled]="!bopForm.form.valid" class="btn btn-primary"><i class="fa fa-save"></i> <span>保存</span></button>
                </div>
            </form>
        </div>
    </div>
</div>
